home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17864 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  44 lines

  1. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  2. Path: empros.com!lmichael
  3. From: lmichael@empros.com (Lars Michael)
  4. Subject: Re: Young programmers read me.
  5. Sender: news@empros.com (ems-news)
  6. Message-ID: <Dq0wJ4.8oA@empros.com>
  7. Date: Wed, 17 Apr 1996 20:21:03 GMT
  8. References: <4l1dn6$j3@belle.bork.com>
  9. Nntp-Posting-Host: pern.empros.com
  10. Organization: Siemens-Empros Power Systems Control
  11. X-Newsreader: Tin 1.1 PL5
  12.  
  13. Randy Scott (scottr@belle.bork.com) wrote:
  14. > : >or this:
  15. > : >       if(something_happened)
  16. > : >       {   do_something_else(); }
  17. > : 
  18. > :      Extraneous braces cause pause.
  19. > I would have to agree, use braces only when absolutely necessary.
  20.  
  21.  
  22. Hmm,  I recommend exactly the opposite:
  23.  
  24.     _Always_ use braces.
  25.  
  26.  
  27. Reasons?
  28.  
  29. 1)  No bad surprises when using Macros.
  30.  
  31. 2)  No confusion about which if an else belongs to.
  32.  
  33. 3)  Indentation is more regular.
  34.  
  35.  
  36. Regards,
  37.                                                        Larry
  38. --
  39. Lars "Larry" Michael               "Sanity is madness put to
  40. lmichael@empros.com                good use."
  41. lars@frankendata.de                       - George Santayana
  42. da291@fim.uni-erlangen.de
  43.